package com.bydq.patrolsystem.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author 写代码是不可能写代码的啦~~
 * @since 2020-05-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class PsSolvetaskMain implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @TableField("solveTaskCode")
    private String solveTaskCode;

    @TableField("solveTaskName")
    private String solveTaskName;


    /**
     * 工作单据ID
     */
    @TableField("workDocType")
    private Long workDocType;

    @TableField("workDocTypeName")
    private String workDocTypeName;

    @TableField("taskDesc")
    private String taskDesc;

    @TableField("taskManagerCode")
    private String taskManagerCode;

    @TableField("taskManagerName")
    private String taskManagerName;

    /**
     * 任务状态ID
     */
    @TableField("taskStatus")
    private Long taskStatus;

    @TableField("taskStatusName")
    private String taskStatusName;

    /**
     * 任务完成时间
     */
    @TableField("finishTime")
    private Date finishTime;

    private String common;

    @TableField("managerSuggestion")
    private String managerSuggestion;

    @TableField("taskFinishDesc")
    private String taskFinishDesc;

    @TableField("taskFinishReport")
    private String taskFinishReport;

    @TableField("taskNotes")
    private String taskNotes;

    @TableField("issuedByCode")
    private String issuedByCode;

    @TableField("issuedByName")
    private String issuedByName;

    /**
     * 任务下发时间
     */
    @TableField(value = "issuedTime",fill = FieldFill.INSERT)
    private Date issuedTime;

    @TableField("issuedSuggestion")
    private String issuedSuggestion;

    /**
     * 创建时间
     */
    @TableField(value = "creationTime",fill = FieldFill.INSERT)
    private Date creationTime;

    @TableField("createdBy")
    private String createdBy;

    /**
     * 最后修改时间
     */
    @TableField(value = "lastUpdateTime",fill = FieldFill.INSERT_UPDATE)
    private Date lastUpdateTime;

    /**
     * 是否取消（1、是 0、否）默认为0
     */
    @TableField("isCancel")
    private Long isCancel;

    public String getIsCancelStr(){
        if(isCancel==0){
            return "否";
        }else if(isCancel==1){
            return "是";
        }else{
            return "";
        }
    }

}
